package com.ming.sportdemo.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ming.sportdemo.bean.Clothes;
import com.ming.sportdemo.bean.Field;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Mapper
@Repository
public interface FieldDao extends BaseMapper<Field>{
    public Field getFieldByMessage(@Param("fieldName") String fieldName,@Param("fieldLocation") String fieldLocation);
    public List<Field> getAllField(@Param("fieldName")String fieldName,@Param("fieldLocation")String fieldLocation,@Param("pageStart") int pageStart,@Param("pageSize")int pageSize);
    public int getFieldCounts(@Param("fieldName")String fieldName);
    public int addField(Field field);
    public int deleteField(@Param("fieldId") int filedId);
    public Field getUpdateField(int fieldId);
    public int updateField(Field field);
    Field getByName(@Param("fieldName")String fieldName);
}
